apiVersion: v1
kind: Service
metadata:
  name: {{ template "name" . }}
  labels:
    app: {{ template "name" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
    component: {{ template "name" . }}
    role: client
spec:
  selector:
    component: {{ template "name" . }}
    role: client
  ports:
  - name: http
    port: {{ .Values.service.httpPort }}
    targetPort: 9200
    protocol: TCP
  - name: transport
    port: {{ .Values.service.transportPort }}
    targetPort: 9300
    protocol: TCP
